package Day09.Demo14;


import java.util.ArrayList;

/**
 * @author hyhWTX
 * @version 1.0
 * @date 2022年03月02日 12:49
 */


public class MainRedPage {
    public static void main(String[] args) {
        Manager manager = new Manager("群主",1000);

        Number one  = new Number("成员A",0);
        Number two  = new Number("成员B",0);
        Number three  = new Number("成员C",0);

        manager.show();
        one.show();
        two.show();
        three.show();
        System.out.println("================");


        //群主共发60元红包，分3个
        ArrayList<Integer> redList = manager.send(60,3);

        //三个普通成员去收红包
        one.receive(redList);
        two.receive(redList);
        three.receive(redList);

        //再打印一次各个成员余额
        System.out.println("各个成员抢完红包后的余额");
        manager.show();
        one.show();
        two.show();
        three.show();
    }
}
